function [res contOut] = bciTestLogReg(bci,dat)

P = kneu_test_logreg(bci.LogReg,dat);
% P = kneu_test_smlr(bci.LogReg,dat);

% %normL=P.likelihoods./(sum(P.likelihoods,2)*ones(1,size(P.likelihoods,2)));
% 
% normL=P.likelihoods./(sum(P.likelihoods,2));

% if normL(1)>0.35,
%     res=bci.leftEvent;
% elseif normL(3)>0.35,
%     res=bci.rightEvent;
% else
%     res=bci.baseEvent;
% end
    
res=P.prediction;
if nargout>1,
    contOut = max(P.likelihoods,[],2);
end